package Sds

func (str32 *Str32) GetLen() uint64 {
	return uint64(str32.len)
}

func (str32 *Str32) SetValue(bts []byte) ISds {
	if uint64(len(bts)) > MaxType8 {
		sds := NewSds(bts)
		sds.SetValue(bts)
		return sds
	}
	copy(str32.char, bts)
	str32.len = uint32(len(bts))
	str32.free = MaxType32 - str32.len
	return str32
}

func (str32 *Str32) GetValues() []byte {
	return str32.char[0:str32.len]
}

func (str32 *Str32) GetFree() uint64 {
	return uint64(str32.free)
}
